<?php
defined('BASEPATH') OR exit('No direct script access allowed');
	class Article_model extends CI_Model{
        public $table_name='article';
    	public function get_all(){
            $query=$this->db->get($this->table_name);
            return $query->result();
        }
        public function get_notes(){
            $query=$this->db->where('type',0)->order_by('id', 'DESC')->limit(5)->get($this->table_name);
            return $query->result();
        }
        public function get_news(){
            $query=$this->db->where('type',1)->order_by('id', 'DESC')->limit(5)->get($this->table_name);
            return $query->result();
        }

	}